package com.softlook.mt.server.db.dto;

import java.lang.Integer;
import com.softlook.mt.server.db.dto.User;
import com.softlook.mt.server.db.dto.Device;
import java.lang.String;
import java.lang.Object;

public class Userdevice {
	private Integer userid;
	private Integer deviceid;
	private Integer isactive;
	private User useridUserRefObj = null;
	private Device deviceidDeviceRefObj = null;
	public Integer getUserid() {
		return this.userid;
	}
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	public Integer getDeviceid() {
		return this.deviceid;
	}
	public void setDeviceid(Integer deviceid) {
		this.deviceid = deviceid;
	}
	public Integer getIsactive() {
		return this.isactive;
	}
	public void setIsactive(Integer isactive) {
		this.isactive = isactive;
	}
	public static boolean hasColumn(String column) {
		if(column.toUpperCase().equals("userid".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("deviceid".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("isactive".toUpperCase())){
		   return true;
		}
		return false;
	}
	public boolean equals(Object object) {
		if(!(object instanceof Userdevice)){
			return false;
		}
		
		Userdevice table = (Userdevice)object;
		if(this.userid == null &&  table.userid != null){
		   return false;
		}
		if(this.userid != null &&  table.userid == null){
		   return false;
		}
		if(this.userid != null && !this.userid.equals(table.userid)){
		   return false;
		}
		if(this.deviceid == null &&  table.deviceid != null){
		   return false;
		}
		if(this.deviceid != null &&  table.deviceid == null){
		   return false;
		}
		if(this.deviceid != null && !this.deviceid.equals(table.deviceid)){
		   return false;
		}
		if(this.isactive == null &&  table.isactive != null){
		   return false;
		}
		if(this.isactive != null &&  table.isactive == null){
		   return false;
		}
		if(this.isactive != null && !this.isactive.equals(table.isactive)){
		   return false;
		}
		return true;
	}
	public User getUseridUserRefObj() {
		return this.useridUserRefObj;
	}
	public void setUseridUserRefObj(User useridUserRefObj) {
		this.useridUserRefObj = useridUserRefObj;
	}
	public Device getDeviceidDeviceRefObj() {
		return this.deviceidDeviceRefObj;
	}
	public void setDeviceidDeviceRefObj(Device deviceidDeviceRefObj) {
		this.deviceidDeviceRefObj = deviceidDeviceRefObj;
	}
}
